#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

void drawAsciiChart(const std::vector<float> &data)
{
    const int HEIGHT = 20;
    float max_val = *max_element(data.begin(), data.end());
    float min_val = *min_element(data.begin(), data.end());
    float range = max_val - min_val;

    for (int y = HEIGHT; y >= 0; --y)
    {
        float level = min_val + range * (float)y / HEIGHT;
        for (float val : data)
        {
            std::cout << (val >= level ? "■" : " ");
        }
        std::cout << std::endl;
    }
}

int main()
{
    std::vector<float> data;
    for (int i = 0; i < 50; ++i)
    {
        data.push_back(10 + 10 * sin(i * 0.3f));
    }
    drawAsciiChart(data);
    return 0;
}